<?php

$buds = mysql_query("SELECT * FROM buds2 WHERE bud_me = '$userid'");
while ($getBuds = mysql_fetch_array($buds))
{
	$buddy = fetch("SELECT display_name,id FROM members2 WHERE id = '$getBuds[bud_you]' AND game = '$game' LIMIT 1");
	$friendList .= "<option value=$buddy[id]>$buddy[display_name]</option>";
}

print "
		<br><center>
		<table width=380 cellspacing=0>
		<tr>
		<td bgcolor=$topAndBottomBG>
		<center><b><font color=$topAndBottomText>Selected Item</font></b></center>
		</td>
		<td width=300 bgcolor=$topAndBottomBG>
		<center><b><font color=$topAndBottomText>Item Details</font></b></center>
		</td>
		</tr>
		<tr height=100>
		<td valign=middle>
		<p align=center><img src=images/user_images/opg_$game/items/item_$find_item2[id].gif>
		<br>
		<b>$find_item2[item_name]</b>
		</td>
		<td width=300>
		<p align=center>Who do you want to give this $find_item2[item_name] to?<br>

		<form action=$base_url/useitems.php?game=$game&action=use&id=$id&item_action=give_away2 method=post><select name=give_to><option value=\"Give to name in field below\">Give to name in field below</option>$friendList</select><br><input type=text name=give_to2><br><input type=submit value=\"Give Item\"></form>
		</p>
		</td>
		</tr>
		</table>
		</center>
";

?>